﻿using System.ComponentModel.DataAnnotations;

namespace PmSoft.Entity
{
    public interface IUser
    {
        /// <summary>
        /// 用户名
        /// </summary>
        public string Name { get; }
        /// <summary>
        /// 用户ID
        /// </summary>
        public int Id { get; }
        /// <summary>
        /// 信息安全Id
        /// </summary>
        public int SecurityId { get; }
        /// <summary>
        /// 登陆类型
        /// </summary>
        public UserType Type { get; }
    }

    /// <summary>
    /// 用户类型
    /// </summary>
    public enum UserType
    {
        /// <summary>
        /// 主管单位
        /// </summary>
        [Display(Name = "主管单位")]
        SysUser = 1,

        /// <summary>
        /// 企业
        /// </summary>
        [Display(Name = "企业")]
        Corp = 2,

        /// <summary>
        /// 建设单位
        /// </summary>
        [Display(Name = "建设单位")]
        Constructor = 3,

        /// <summary>
        /// 银行
        /// </summary>
        [Display(Name = "银行")]
        Bank = 4,

        /// <summary>
        /// 项目管理员
        /// </summary>
        [Display(Name = "项目管理员")]
        Manager = 5,

        /// <summary>
        /// 指挥部
        /// </summary>
        [Display(Name = "指挥部")]
        Commander = 6,

        /// <summary>
        /// 工人
        /// </summary>
        [Display(Name = "工人")]
        Worker = 7
    }
}
